﻿@model Reserva_de_Vuelo.Models.BusquedaVuelo

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

 <script type="text/javascript">
     jQuery(function ($) {
         $("#TipoVueloIdaVuelta_True").click(function () {
             document.getElementById("divFechaRetorno").style.display = "block";
             document.getElementById("lblRetorno").style.display = "block";
         });
         $("#TipoVueloIda_True").click(function () {
             document.getElementById("divFechaRetorno").style.display = "none";
             document.getElementById("lblRetorno").style.display = "none";
         });
     })
 </script>
<link rel="stylesheet" type="text/css" href="/Content/tags-motor.css" />
@using (Html.BeginForm("Resultados", "Home", FormMethod.Post, new { id = Model }))
{
	<div>
    <div id="motores">
		<ul class="tabs">
			<li><a href="#" class="icon-tag-vuelos">Vuelos</a></li>
		</ul>
        <div class="tab_container">
	        <div id="tab1" class="tab_content">
                <div class="motor-normal">
					<div class="contenido_multi">
						<div class="fly">
                            @Html.ValidationMessageFor(model => model.EsIdaVuelta)
							<div class="radio_ida_vuelta">
								<span class="type">Ida y vuelta</span>
								<span class="value">
                                    @Html.RadioButtonFor( model => model.EsIdaVuelta, true, new { id = "TipoVueloIdaVuelta_True", @Checked = "true" } )
									@*<input id="TipoVueloIda" type="radio" name="orientation" value="rbroundtrip" checked="checked"/>*@
								</span>
							</div>
							<div class="radio_solo_ida">
								<span class="type">S&oacute;lo ida</span>
								<span class="value">
									@*<input id="rboneway" type="radio" name="orientation" value="rboneway"/>*@
                                    @Html.RadioButtonFor( model => model.EsIdaVuelta, false, new { id = "TipoVueloIda_True"} )
								</span>
							</div>
						</div>
						<div id="Motor_simple1_div_normal" style="display: block; ">
							<div class="cities">
									<div style="WIDTH: 310px;margin-bottom:4px">
								<span class="type">Origen</span>
								<span class="value">
                                    @Html.TextBoxFor(modelo => modelo.Origen, new { maxlength = 20, autocomplete = "off" , value="LIM", style="width:235px;"})
                                    @Html.ValidationMessageFor(model => model.Origen)
								</span>
								</div>
								<div style="CLEAR: both; WIDTH: 310px;margin-bottom:4px">
								<span class="type">Destino</span>
								<span class="value">
                                    @Html.TextBoxFor(modelo => modelo.Destino, new { maxlength = 20, autocomplete = "off" , value="LIM", style="width:235px;"})
                                    @Html.ValidationMessageFor(model => model.Destino)
								</span>
								</div>
							</div>
							<div class="searchbox" style="margin-left:20px;">
								<div class="pdt-flights">
									<!--ROUNDTRIP-->
									<div id="divRoundTrip" class="ctn-roundtrip">
											<div class="mod-dates">
													<div class="com-datein">
												<div class="c_fechas">
													<label class="label_sal">Salida </label>
													<div class="mn">
                                                    @Html.TextBoxFor(modelo => modelo.FechaSalida, new { @class = "input1", placeholder = "dd/mm/aaaa", maxlength = 10, autocomplete = "off" , @readonly = "readonly" })
                                                    @Html.ValidationMessageFor(model => model.FechaSalida)
													</div>
													<label id="lblRetorno" class="label_ret">Retorno</label>
													<div id="divFechaRetorno" class="mn_in">
                                                    @Html.TextBoxFor(modelo => modelo.FechaRetorno, new { @class = "input2", placeholder = "dd/mm/aaaa", maxlength = 10, autocomplete = "off" , @readonly = "readonly" })
													</div>
													<input type="text" readonly="readonly" id="done" /> 
													<div class="datepicker" style=" margin-top:25px;  display:none; z-index: 998;position: absolute;">
													</div>
											</div>
										</div>
								</div>
							</div>
                                                    @Html.ValidationMessage("IngreseFechaRetorno")
                                                    @Html.ValidationMessage("FechaRetornoMayorFechaSalida")
							<div id="divOneWay" class="ctn-multipledestination" style="display:none">
								<div id="Motor_simple1_divDateRet" class="segment-5">
									<div style="width:400px">
									<div class="mod-dates">
											
												<div class="multicity_origen" style="width:50px;">
											
											<div class="c_fechas" style="width:190px">
												
												<label class="label_sal">Salida </label>
												
												<div class="mn_in">
												<input name="FechaSalidaOneWay" type="text" id="FechaSalidaOneWay" readonly="readonly" class="input3" placeholder="dd/mm/aaaa" />
											</div>
										</div>
										</div>
									 </div>
									</div>
								</div>
							</div>
								</div>
							</div>
						</div>
                        @{
                        List<SelectListItem> lstAdultos = new List<SelectListItem>();
                        for (int intX = 1; intX <= 8; intX++) {
                            lstAdultos.Add(new SelectListItem { Text = intX.ToString(), Value = intX.ToString() });
                        }
                        List<SelectListItem> lstNinos = new List<SelectListItem>();
                        for (int intX = 0; intX <= 5; intX++)
                        {
                            lstNinos.Add(new SelectListItem { Text = intX.ToString(), Value = intX.ToString() });
                        }
                        List<SelectListItem> lstInfantes = new List<SelectListItem>();
                        for (int intX = 0; intX <= 5; intX++)
                        {
                            lstInfantes.Add(new SelectListItem { Text = intX.ToString(), Value = intX.ToString() });
                        }
                        }
						<div class="segmento_adul_nin_inf">
							<span>Adultos&nbsp;&nbsp;&nbsp;</span>
							<span class="value">
                                @Html.DropDownListFor(model => Model.Adultos, lstAdultos, new { @class = "combo_M_vuelos"})
								&nbsp;&nbsp;&nbsp;
							</span>
							<span>Ni&ntilde;os&nbsp;&nbsp;&nbsp;</span>
							<span class="value">
                                @Html.DropDownListFor(model => Model.Ninos, lstNinos, new { @class = "combo_M_vuelos"})
							&nbsp;&nbsp;
							</span>
							<span>Infantes&nbsp;&nbsp;&nbsp;</span>
							<span class="value">
                                @Html.DropDownListFor(model => Model.Infantes, lstInfantes, new { @class = "combo_M_vuelos"})
							</span>
						</div>
						<div class="submit">
							<input type="submit" name="btnBuscarVuelos" value="Buscar" id="btnBuscarVuelos" class="button"  />               
						</div>
					</div>
					<div class="curva_inferior_multi">&nbsp;</div>
                </div>
            </div>
		</div>
	</div>                                                                                                                                                                                                                                                                               
    </div>
}